<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Thêm Địa điểm Bẫy đèn', true), array('action' => 'add')); ?></li>
	</ul>
</div>
<div class="view">
<h2><?php __('DANH MỤC ĐỊA ĐIỂM BẪY ĐÈN');?></h2>
<p>
<?php
$paginator->options(array('url'=>$this->passedArgs));
echo $paginator->counter(array(
'format' => __('Hiện có %count% mẫu tin - Trang %page%/%pages%', true)
));
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
<!--	<th><?php echo $paginator->sort('STT','Bayden.id');?></th> -->
	<th><?php echo __('STT');?></th>
	<th><?php echo $paginator->sort('Trạm BVTV','Trambvtv.TEN_TR');?></th>
	<th><?php echo $paginator->sort('Tên bẫy đèn','Bayden.TEN_BD');?></th>
	<th><?php echo $paginator->sort('Tọa độ','Bayden.HD');?></th>
<!--	<th><?php echo $paginator->sort('Vĩ độ (Bắc)','Bayden.TDO');?></th>  -->
	<th><?php echo $paginator->sort('Ghi chú','Bayden.ghichu');?></th>

	
	<th class="actions"><?php __('Hành Động');?></th>
</tr>
<?php
$i = 0; $j=1;
foreach ($baydens as $bayden):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td>
			<?php //echo $bayden['Bayden']['id']; 
				echo $j;
				$j=$j+1;
			?>
		</td>
		
		<td>
			<?php echo $bayden['Trambvtv']['TEN_TR']; ?>
		</td>
		<td>
			<?php echo $bayden['Bayden']['TEN_BD']; ?>
		</td>
<!--		<td>
			<?php echo $bayden['Bayden']['HDO']; ?>
		</td>
	-->	
		<td>
			<?php echo "(".$bayden['Bayden']['hdo_h'].' '.$bayden['Bayden']['HDO'].'<sup>0</sup>'.$bayden['Bayden']['hdo_p']."<b>'</b>"." ; ".$bayden['Bayden']['tdo_h'].' '.$bayden['Bayden']['TDO'].'<sup>0</sup>'.$bayden['Bayden']['tdo_p']."<b>'</b>".")";  
			//echo $tuyen['Tuyen']['tddau']; ?>
		</td>
<!--		
		<td>
			<?php echo $bayden['Bayden']['TDO']; ?>
		</td>
		-->
		<td>
			<?php echo $bayden['Bayden']['ghichu']; ?>
		</td>
	
		
		<td class="actions">
			<?php echo $html->link(__('Xem', true), array('action' => 'view', $bayden['Bayden']['id'])); ?>
			<?php if ($curUser['User']['ROLE'] != 'admin')
					echo $html->link(__('Sửa', true), array('action' => 'edit', $bayden['Bayden']['id'])); ?>
			<?php if ($curUser['User']['ROLE'] != 'admin')
					echo $html->link(__('Xóa', true), array('action' => 'delete', $bayden['Bayden']['id']), null, sprintf(__('BẠN CÓ CHẮC MUỖN XÓA # %s?', true), $bayden['Bayden']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('Trước', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('Sau', true).' >>', array(), null, array('class' => 'disabled'));?>
</div>

